package com.csxy.six.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csxy.six.entity.AnnouncementAttachment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 公告附件Mapper接口
 * 提供公告附件相关的数据库操作
 */
@Mapper
public interface AnnouncementAttachmentMapper extends BaseMapper<AnnouncementAttachment> {

    /**
     * 根据公告ID查询附件列表
     */
    @Select("SELECT * FROM announcement_attachment WHERE announce_id = #{announceId}")
    List<AnnouncementAttachment> selectByAnnounceId(@Param("announceId") Integer announceId);
}